In typical networks, such as those depicted in FIG. 1, switches and routers are used to guide network traffic consisting of packetized data from one node to the next in order to guide each of those packets from its source to its destination. Networking nodes such as switches and routers have previously been implemented using custom logic designs to process these packets. More recently, programmable devices referred to as network processors have been deployed in networking nodes in order to achieve more flexibility and more complex functionality.
Packets traversing a network consist of a data payload that has been encapsulated within one or more protocol layers, each with an associated protocol header. These headers include information regarding both the origination and destination of a packet, as well as some indications of actions taken by the network in transporting the packet. These headers contain the data required by the network processor or other switching/routing devices in order to properly handle a packet at a particular network node. Several different network processor architectures have been implemented, with differing approaches in terms of dispatching header contents from individual packets to guide the processing of those packets. Some architectures allow the entire packet to flow through the network processor, enabling the processor to extract header fields of interest. Other network processors work jointly with a data flow device that stores the packet data in a packet memory and dispatches only packet headers to the network processors. There are two variants of these data flow devices. A first type stores the entire packet, and then retrieves a packet header from the packet memory when the time is appropriate for the network processor to handle the packet. A second type of data flow device splits the packet into a header piece and a body piece, and stores the body piece immediately in the packet memory, while sending the header piece directly to the network processor without storing it in the packet memory. The header piece, after being processed by the network processor, is returned to the dataflow device where it is joined to the original packet body.
FIG. 1 is a depiction of several networks in the prior art. Specifically, network 2 is representative of a campus network consisting of a plurality of network nodes 10, 20 providing switching and routing functions in order to interconnect client hosts 12, 14, 16, 22, 24, 26 and server hosts 17, 18, 27. Network nodes 10, 20 are also interconnected with each other in order to facilitate interconnection of hosts attached to different nodes. Network node 10 also includes a gateway function 19 that provides a connection to the Internet 40. Gateway function 19 may also include advanced network functions such as firewall and other security features. Thus any host in network 2 is capable of accessing the Internet 40 and other devices and networks attached to the Internet 40. Network 4 is representative of a small office network with a single network node 30 interconnecting a small number of client hosts 34, 36 and server hosts 38 . Network node 30 also includes a gateway function 32 that provides a connection to the Internet 40. Internet 40 consists of a plurality of network nodes 42, 44, 46 providing routing functions within Internet 40. Network 5 is representative of an array of web servers 52, 54, 56 attached to the Internet 40 through a load balancer 50. As will be understood by those skilled in the art, FIG. 1 is for illustrative purposes only and represents significant simplification of real networks. As such, network functions depicted should not be interpreted as a limitation in any way as to the variety of networking functions and environments for which the present invention can be practiced.
FIG. 2 is a depiction of a typical switch/router 10 in the prior art that might be used at each network node 10, 20, 30, 42, 44, 46. Switch/router 10 consists of a switch fabric 60 interconnecting multiple router blades 80, 90, 100. Each router blade is also connected to one or more network interfaces, each of which may connect to another network, another network node within the same network, a server host, a client host, or other network-attached devices. Specific router blades may support gateway, firewall, load balancer, and other network functions, in addition to standard packet forwarding, depending on configuration and position within the network.
FIG. 3 is a more detailed depiction of a specific router blade 100 in the prior art that might be used within each switch/router network node 10, 20, 30, 42, 44, 46. Ports consisting of an input component 110, and an output component 112 provide connections to network links. A blade 100 may support a single high-speed port in each direction or a plurality of lower speed ports. An Ingress data flow device 130 receives packets from network links through input ports 110 and sends packets to the switch fabric 60 through switch interface 120. An Egress data flow device 132 receives packets from switch fabric 60 through switch interface 122 and sends packets to the network links through output ports 112. Ingress data flow device 130 stores packets in a packet memory or buffer, and sends packet headers to network processor 140 for appropriate handling of Ingress tasks. Egress data flow device 132 stores packets in a packet memory or buffer, and sends packet headers to network processor 142 for appropriate handling of Egress tasks. Optional implementations may replace the combination of network processors 140 and 142 with a single network processing complex capable of processing either Ingress or Egress tasks. It should be recognized that functional blocks illustrated in FIG. 3 may each be individual chips, or may be functions within a single larger chip, or any combination of the two.
FIG. 5 is a depiction of typical network packets in the prior art. In each case, the data payload 290 is encapsulated within one or more layers of protocol, each with an associated protocol header. Packet 202 depicts an Ethernet packet encapsulating a TCP/IP message. Packet 202 consists of an Ethernet header 200, IP header 240, TCP header 260, data payload 290, and Cyclic Redundancy Code (CRC) 295 for error protection. Packet 204 depicts an Ethernet packet encapsulating an UDP/IP message. Packet 204 consists of an Ethernet header 200, IP header 240, UDP header 280, data payload 290, and CRC 295 for error protection. Packet 222 depicts a Point-to-Point (PPP) packet, typically used in Packet-over-Sonet (POS) network connections, encapsulating a TCP/IP message. Packet 222 consists of a PPP header 220, IP header 240, TCP header 260, data payload 290, and CRC 295 for error protection. Packet 224 depicts a PPP packet encapsulating an UDP/IP message. Packet 224 consists of a PPP header 220, IP header 240, UDP header 280, data payload 290, and CRC 295 for error protection. Packet 226 depicts a PPP packet, with MPLS encapsulation of a TCP/IP message. Packet 226 consists of a PPP header 220, MPLS label 230, IP header 240, TCP header 260, data payload 290, and CRC 295 for error protection. Packet 228 depicts a PPP packet, with MPLS encapsulation of an UDP IP message. Packet 228 consists of a PPP header 220, MPLS label 230, IP header 240, UDP header 280, data payload 290, and CRC 295 for error protection. The forgoing packet formats are common examples of typical packet formats, but it is understood that many other protocols and combinations of protocols coexist within various networks and could equally well provide a prior art foundation upon which to practice the present invention.
FIG. 6 is a depiction of typical packet header formats in the prior art for packet headers used in packet formats depicted in FIG. 5. Note that many of the fields defined in these protocol headers are not required by intermediate routing nodes but are included in a dispatch to a network processor in order to send a single contiguous block of header data during dispatch operations. Ethernet header 200 consists of the following fields:
VLAN tag2 bytesEthernet MAC Destination Address6 bytesEthernet MAC Source Address6 bytesEthernet Type2 bytesThe PPP header 220 consists of the following fields:
Address1 byteControl1 byteProtocol2 bytesThe MPLS header 230 consists of the following fields:
MPLS label4 bytesThe IP header 240 consists of the following fields:
Version/Header length1 byteTOS1 byteLength2 bytesID2 bytesFlag/Fragment offset2 bytesTTL1 byteProtocol1 byteChecksum2 bytesSource Address4 bytesDestination Address4 bytesOptions/Padding4 bytesThe TCP header 260 consists of the following fields:
Source Port2 bytesDestination Port2 bytesSequence Number4 bytesAcknowledge Number4 bytesData Offset/Reserved1 byteControl/Reserved1 byteWindow2 bytesChecksum2 bytesUrgent2 bytesOptions/PaddingvariableThe UDP header 280 consists of the following fields:
Source Port2 bytesDestination Port2 bytesLength2 bytesChecksum2 bytes
As can be readily understood from the forgoing description of protocol headers required by a network processor to handle network packets, a substantial amount of data must be sent to the network processor during the dispatching of a packet-forwarding task, although some of the fields in these protocol headers are not required by intermediate routing nodes. Moreover, it should be understood that each packet dispatch includes additional overhead associated with the specific network processor architecture. In each of the network processor configurations previously mentioned, a significant amount of data must be exchanged with the network processor in order for the network processor to complete its required tasks with regards to guiding network packets through the network node. This becomes more challenging as network links become increasingly fast, with corresponding increases in packet rates. In the past, dispatching of packet tasks has been dealt with by dispatching a complete packet header to the network processor for each packet to be handled. But this is cumbersome and relatively slow, and network links continue to increase in their transport capacity. Hence, a faster and more efficient technique is needed to dispatch appropriate data to a network device.